package 设计模式.util.prototype;

import java.util.Date;

/**
 * @功能
 * @创建时间 2020/5/3
 * 深复制
 */
public class Client {

        public static void main(String[] args) throws CloneNotSupportedException {
            Sheep1 s1 = new Sheep1("11",new Date(111));
            System.out.println(s1);
            s1.setSbirthday(new Date(222));
            s1.setSname("www");
            Sheep1 s2 = (Sheep1) s1.clone();
            System.out.println(s2);
            System.out.println(s1.getSbirthday()==s2.getSbirthday());
            System.out.println(s1.getSname().equals(s2.getSname()));
        }
    }

